/*
 * @Project Name: spring-boot
 * @File Name: ApiException
 * @Package Name: com.hhly.spring.boot.cache.config
 * @Date: 2018/4/18 11:41
 * @Creator: linshixing-1199
 * @line------------------------------
 * @修改人:
 * @修改时间:
 * @修改内容:
 */

package com.sm.shoplook.vo.base;

import com.sm.shoplook.constant.ResultMessage;

/**
 * @author chenpy-1072
 * @desc TODO
 * @date 2018/4/18 11:41
 * @see
 */
public class ApiException extends Exception {

	private String message;
	private Integer code;

	public ApiException(Integer code, String message) {
		this.message = message;
		this.code = code;
	}

	public ApiException(ResultMessage resultMessage) {
		this.code = resultMessage.getCode();
		this.message = resultMessage.getMessage();
	}

	public ApiException() {
	}

	@Override
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}
}
